#include<stdio.h>

int* twoSum(int* numbers, int numbersLen, int target, int* returnSize) {
    *returnSize = 2;
    int* arr = (int*)malloc(sizeof(int) * 2);
    for (int i = 0; i < numbersLen; i++)
    {
        if (numbers[i] > target)
            continue;
        int sum = numbers[i];
        for (int j = i + 1; j < numbersLen; j++)
        {
            if (numbers[j] > target && numbers[i] > 0)
                continue;
            sum += numbers[j];
            if (sum == target)
            {
                arr[0] = i + 1;
                arr[1] = j + 1;
                return arr;
            }
            else
            {
                sum = numbers[i];
            }
        }
    }
    return NULL;
}